#include "common.h"
#include "cpu/exec/helper.h"
#include "cpu/reg.h"


make_helper(iret){
    current_sreg = R_SS;
	cpu.eip= swaddr_read(cpu.esp,4);
	cpu.esp+=4;
	cpu.cs.selector= swaddr_read(cpu.esp,2);
	cpu.esp+=2;
	sreg_load(R_CS);
	cpu.eflags.val= swaddr_read(cpu.esp,4);
	cpu.esp+=4;
	return 0;
}